package com.feidu.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;

public class SharedPreferencesUtil {

	private static final String SPNAME = "com.feidu";
	
	public static void saveUserObjId(Context context, String objectId){
    	try {
			SharedPreferences sharedPreferences = context.getSharedPreferences(SPNAME+"objectId", Activity.MODE_PRIVATE);
			SharedPreferences.Editor editor = sharedPreferences.edit();
			editor.putString("objectId", objectId);
			editor.commit();
		} catch (Exception e) {
		}
    }
	
	public static String getUserObjId(Context context){
    	try {
    		SharedPreferences sharedPreferences = context.getSharedPreferences(SPNAME+"objectId", Activity.MODE_PRIVATE);
    		return sharedPreferences.getString("objectId","");
		} catch (Exception e) {
		}
		return "";
    }
}
